<?php

use yii\helpers\Html;
?>
<!DOCTYPE html>
<html>
    <head lang="zh">
        <meta charset="UTF-8">
        <title><?= Html::encode($this->title) ?></title>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="renderer" content="webkit">
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
        <meta name="format-detection" content="telephone=no"/>
        <meta name="format-detection" content="email=no"/>
        <link rel="stylesheet" type="text/css" href="http://img.myscrmimg.cn/projects/qmyx/public/css/common/base.css"/>
        <link rel="stylesheet" type="text/css" href="http://img.myscrmimg.cn/projects/qmyx/public/css/common/ui.css"/>
        <link rel="stylesheet" type="text/css" href="http://img.myscrmimg.cn/projects/qmyx/public/css/common/common.css"/>
        <link rel="stylesheet" type="text/css" href="http://img.myscrmimg.cn/projects/qmyx/public/css/common/bootstrap-forms.min.css"/>
        <link rel="stylesheet" type="text/css" href="http://img.myscrmimg.cn/projects/qmyx/public/css/common/bootstrap-grid-24.min.css"/>
        <link rel="stylesheet" type="text/css" href="http://img.myscrmimg.cn/projects/qmyx/public/css/common/bootstrap-glyphicons/css/bootstrap.min.css"/>
        <link rel="stylesheet" type="text/css" href="http://img.myscrmimg.cn/projects/qmyx/public/css/index.css"/>
        <link rel="stylesheet" type="text/css" href="/mypublic/css/index.css"/>

        <?php echo Html::cssFile('/public/misc/jquery.jqGrid-4.6.0/css/ui.jqgrid.css') . "\n"; ?>
        <?php echo Html::cssFile('/public/misc/jquery-ui-themes-1.11.2/humanity/jquery-ui.min.css') . "\n"; ?>
        <?php //echo Html::jsFile('/public/js/lib/jquery/jquery-1.11.2.min.js') . "\n"; ?>
        <?php echo Html::jsFile('/static_public/node_modules/jquery/dist/jquery.js') . "\n"; ?>
        <?php echo Html::jsFile('/public/misc/jquery.jqGrid-4.6.0/js/i18n/grid.locale-cn.js') . "\n"; ?>
        <?php echo Html::jsFile('/public/misc/jquery.jqGrid-4.6.0/js/jquery.jqGrid.min.js') . "\n"; ?>

        <style>
            .name {
                text-align: left;
            }

            .padding_1 {
                padding-left: 21px;
            }

            .padding_2 {
                padding-left: 41px;
            }

            .padding_3 {
                padding-left: 61px;
            }

            .padding_4 {
                padding-left: 81px;
            }
            .loading {
                height: auto;
            }
            /*.table {*/
            /*width: 1000px;*/
            /*margin: 0 auto;*/
            /*}*/

            /**
             * Yii App private css
             */
            div.errorSummary
            {
                border: 2px solid #C00;
                padding: 7px 7px 12px 7px;
                margin: 0 0 20px 0;
                background: #FEE;
                font-size: 1em;
            }

            div.errorSummary p
            {
                margin: 0;
                padding: 5px;
                font-weight: bold;
            }

            div.errorSummary ul
            {
                margin: 0;
                padding: 0 0 0 20px;
            }

            div.errorSummary ul li
            {
                list-style: square;
                color: red;
            }
            .side {
                font-size:12px;
            }

        </style>
        <?php $this->head() ?>
    </head>
</head>
<body>
    <!-- top 顶部 -->
    <div class="top">
        <div class="wrap">
            <a href="/index.shtml" class="logo"></a>
            <div class="fr">
                <a class="top-link" href="#"><i class="top-icon top-icon-notice"></i>通知</a>
                <a class="top-link" href="#"><i class="top-icon top-icon-help"></i>帮助</a>
                <div class="top-split"></div>
                <div class="top-avator"><img src="/static_public/images/icon/avator.png" alt=""></div>
                <div class="top-userinfo">
                    <div class="top-userinfo-head" id="js_userinfo"><span id="js_user_name"><?php echo Yii::$app->user->isGuest ? "" : Yii::$app->user->identity->username; ?></span><i class="top-userinfo-arrow"></i></div>
                    <div class="top-userinfo-menu">
                        <div class="top-userinfo-menu-list">
                            <!-- <a href="#"><i class="top-icon top-icon-pw"></i>修改密码</a>-->
                            <a href="<?php echo \Yii::$app->urlManager->createUrl(['site/logout']); ?>" id="js_logout"><i class="top-icon top-icon-logout"></i>安全退出</a>
                        </div>
                        <i class="top-userinfo-menu-arrow"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="layout">
        <!-- 容器 [[-->
        <div class="container">
            <div class="wrap clearfix">

                <div class="side mt10">
                    <div class="nav">
                        <ul id="nav">
                            <?php foreach (Yii::$app->params['menuOfficial'] as $item) : ?>
                                <?php
                                $select = '';
                                if (isset($item['controller']) && $item['controller'] == \Yii::$app->controller->id) {
                                    $select = 'nav-selected';
                                }
                                ?>
                                <li class="p-500301 <?php echo $select; ?>" id="menu_cms">
                                    <a class="nav-a" href="<?php echo isset($item['controller']) ? urldecode(\Yii::$app->urlManager->createUrl([$item['controller'] . '/' . $item['action']])) : '#'; ?>">
                                        <i class="<?php echo $item['icon']; ?>"></i><?php echo $item['label']; ?>
                                    </a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    </div>
                </div>

                <div class="content">
                    <?= $content ?>
                </div>

            </div>
        </div>
        <!-- 容器 ]]-->
    </div>
</body>
</html>

<script>
$(document).ready(function () {
    $('#js_userinfo').on('click', function(){
        if($(".top-userinfo-menu").is(":visible")){
            $(".top-userinfo-menu").hide();
        }else{
            $(".top-userinfo-menu").show();
        }
    });
});
</script>
